home *** CD-ROM | disk | FTP | other *** search
- VBBS type mod......
- Altair #1 @14259
- Mon Feb 15 17:57:05 1993
- 2[4Status2] :1 No Reply Necessary.
-
- ==============================================================================
- NET.MOD
-
- List NET CALLS after the last few callers like VBBS does!
- Revised for 4.22 by,
- Altair 1 @14259 LINK 1 @4259 NET
- Mon Febuary 15, 10:00 am 1993
- Dificulty Easy....
- Version: 422 and most others as long as
- they are running NET 32. With the right modification
- this mod will work with NET 31 also.
-
- Let me stress that the idea for this mod is originally not mine.
- I just added things here and there to make it work a little nicer.
-
- ==============================================================================
-
- OkAY Ever noticed how when you log on to a BBS running the VBBS software, and
- there has been a net connection recently, it displays the network's name
- after the "Last Few Callers" section? Well, I kinda like that. I thought
- "Hey, why can't we do that with WWIV?" The most obvious problem is that
- the writes to NET.LOG are made by the network software, NOT by WWIV.
- Therefore, one would have to modify the network software to get it to do
- it then. Well, instead of that, what this mod does is a tad more difficult.
- When the BBS notices it's a network connection <usernum==-2> it runs the
- network program. AFTER that, it does a tiny bit of processing. <Cleaning
- up from the network, re-initializing the modem, etc> Well, I figured, "Why
- not read the NET.LOG file, find out what the last connection was, and then
- write it to the LASTON1.TXT and USER1.LOG files?" That's what I did.
-
-
- Anyway, as it's written this mod will ONLY work for NET32, as it uses certain
- info the way NET 32 writes it to the log.
- With minor modification it can work on 4.21 and lower.
-
- > I added a few things to this mode like, color and the name of the last
- > network connected to along with it's phone number.
- > All credit for this mode must still go to the
- > original Author Galen Pathwarden #1 @17303
-
-
- FILES AFFECTED: LILO.C
- NETSUP.C
- BBS.C
- SYSOPF.C
- FCNS.H
-
- KEY: +++ add line
- === Look for line
- --- Delete Line
- ??? Modifiy Line
-
-
- STEP ONE: BACK UP YOUR SOURCE! I am not responsible for ANY damage caused
- to your source, data files, or computer as a result of this mod. It has been
- tested on my system and has caused no problems.
-
-
- STEP TWO: Load LILO.C
- Scan down for VOID GETUSER. A little ways down, it will have the stuff
- with NETWORK.EXE, REMOTE.EXE, etc. A tiny bit below that, add this section
- of code:
-
- === get_status();
- === if (l!=status.qscanptr) {
- === for (i=0; i<num_subs; i++) {
- === sub_dates[i]=0L;
- === }
- === }
- +++ if (usernum==-2)
- +++ add_net_to_log();
- === hangup=1;
- === dtr(0);
- === global_xx=0;
-
-
- while still in LILO.C in void logon(); search down for this section of code
- and add the additions. this will also make your last few callers print in color.
- (Delete your laston.txt and user.log in the gfiles directory)
- Because of the new format for these files.......
-
- === pl(s1);
- === }
- === while (pos<len);
- === }
- +++ printfile("LASTON1.TXT");
- === nl();
- === if ((actsl!=255) || (incom)) {
- === sl1(0,"");
- === sl1(0,s);
- === sl1(1,"");
- ??? sprintf(s,"4[3%ld4]1: 2%-34s 1%s 5%s 7%s - %d\r\n",
- === status.callernum1,
- === nam(&thisuser,usernum),
- ??? times(),
- ??? date(),
- === curspeed,
- === thisuser.ontoday);
-
-
- STEP THREE: Save LILO.C, and load NETSUP.C
- Add this entire void at the bottom.
-
-
- void add_net_to_log(void)
- {
- int nn,sn,i,i1,f;
- char s[81],s1[81],s2[81],*ss;
- FILE *fil;
- long len,pos;
- net_system_list_rec *csne;
-
- sprintf(s,"%sNET.LOG",syscfg.gfilesdir);
- if ((fil=fopen(s,"rt"))==NULL)
- return;
- fgets(s1,22,fil); /* change to 24 for NET 31 and below */
- fgets(s1,6,fil);
- if (s1[strlen(s1)]==',')
- s1[strlen(s1)]=0;
- sn=atoi(s1);
- fclose(fil);
- for (nn=0; nn<net_num_max; nn++) {
- set_net_num(nn);
- if (!net_sysnum)
- continue;
- if (!net_networks[net_num].con)
- read_call_out_list();
- i=-1;
- for (i1=0; i1<net_networks[net_num].num_con; i1++) {
- if (net_networks[net_num].con[i1].sysnum == sn) {
- i=i1;
- break;
- }
- }
- if (i==i1)
- break;
- }
- if (i==-1)
- return;
- strcpy(s1,net_networks[net_num].name);
- csne=next_system(sn);
- sprintf(s,"5%-4s: 2@3%-6d1%-25s 2%s 7%s\r\n",
- s1, /* Net Name */
- sn, /* Node Connected */
- csne->name,
- csne->phone,
- times());
- pl(s);
- sprintf(s2,"%sLASTON1.TXT",syscfg.gfilesdir); /* Makes a file named LASTON1.TXT in G-files directory */
- ss=get_file(s2,&len);
- sprintf(s1,"%sUSER1.LOG",syscfg.gfilesdir); /* Makes a file named USER1.LOG in G-files directory */
- f=open(s1,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
- lseek(f,0L,SEEK_END);
- i=strlen(s);
- write(f,(void *)s,i);
- close(f);
- f=open(s2,O_RDWR | O_BINARY | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
- pos=0;
- copy_line(s1,ss,&pos,len);
- for (i=1; i<4; i++) {
- copy_line(s1,ss,&pos,len);
- strcat(s1,"\r\n");
- write(f,(void *)s1,strlen(s1));
- }
- write(f,(void *)s,strlen(s));
- close(f);
- }
-
-
-
- STEP FOUR: Save NETSUP.C, load FCNS.H
- add to end of NETSUP.C the void you just put in.
-
-
- /* File: netsup.c */
-
- Add this line:
-
- === void print_pending_list(void);
- +++ void add_net_to_log(void);
-
-
-
- STEP FIVE: Save FCNS.H, COMPILE!
-
- STEP SIX: Wait for a network call to come in, and check the laston1.txt and
- you'll see the network's name and the node listed, along with the Name of
- the board, the Phone number, and time! WOW!
-
- STEP SEVEN: open BBS.C This part is your option!!
- you don't have to do this for the mod to work.
- What this will do is make a /L option from the
- main menu that will show the total Network connects
- for the day.
-
-
- search for void mainmenu(void) and look for:
-
- === if (strcmp(s,"/Z")==0) {
- === pl(get_string(26));
- === set_x_only(1, "POSTS.TXT", 0);
- === nscan(0);
- === set_x_only(0, NULL, 0);
- === add_arc("OFFLINE", "POSTS.TXT", 0);
- === download_temp_arc("OFFLINE", 0);
- === }
- +++ if (strcmp(s,"/L")==0) {
- +++ nl();
- +++ prt(1,"Network Connects");
- +++ printfile("USER1.LOG");
- +++ }
- === if (strcmp(s,"NET")==0)
- === print_net_listing(0);
-
- also remember to edit your menus so that the option will
- be shown.............
-
-
-
- STEP EIGHT: Load up SYSOPF.C and search for void beginday(void)
- What this does is at midnight every day it will delete
- the file USER1.LOG so you don't end up with just one
- large file.
- Then Look for this section of code and add what is below.
-
-
- === sprintf(s,"%s%s",syscfg.gfilesdir, ststus.log2);
- === unlink(s);
-
- === sprintf(s,"%sUSER.LOG",syscfg.gfilesdir);
- === unlink(s)
-
- +++ sprintf(s"%sUSER1.LOG",syscfg.gfilesdir);
- +++ unlink(s);
- === save_status();
- === sprintf(s,"%sZLOG.DAT",syscfg.datadir);
-
-
- That's it for SYSOPF.C close it up and recompile the BBS.
-
- STEP NINE: Send email if you have any problems with this.
-
-
- You can contact me at:
- WWIVNET : 1@4259
- WWIVLink: 1@14259
-
- Or, call my BBS
- Into The Night
- (412)758-2456
- 300-2400 baud
- 24 Hours........